#pragma once

#include "StreamSocket.h"
#include "UnboundedBuffer.h"
#include "ProtoParser.h"
#include <pingcap/Exception.h>
#include <pingcap/kv/Scanner.h>
#include <pingcap/kv/Snapshot.h>
#include <pingcap/kv/Txn.h>

class Client: public StreamSocket
{
private:
    PacketLength _HandlePacket(const char* msg, std::size_t len) override;

    UnboundedBuffer reply_;

    ProtoParser parser_;
 
public:
    Client();

    void _Reset();

    void OnConnect() override;

};
